1. Field of the Invention
The present invention relates to a polygon drawing method and system for drawing a polygon at a high speed on such a display as a CRT display for use in computer graphics or the like.
2. Description of the Related Art
In the computer graphics field, there has recently been utilized a drawer for carrying out high-speed drawing. As a technique for improving the drawing speed of such a drawer, there has been developed a technique which utilizes the function of a drawer to draw a polygon.
A technique for drawing a polygon with use of a prior art drawer system will be explained. FIG. 15 shows a block diagram of an arrangement of a prior art drawer, which includes a triangle separater 801, a triangle vertex register 802, a 1st triangle side interpolater 803, a 2nd triangle side interpolater 804, a 3rd triangle side interpolater 805, an interpolation data selector 806, a polygon vertex data 821, triangle vertex data 822, triangle side point data 823, interpolated line data 824 of the 1st triangle side, interpolated line data 825 of the 2nd triangle side, interpolated line data 826 of the 3rd triangle side, 2nd span point data 827, a triangle data valid signal 828, a next span send request 829, an outline generator 106, a line drawer 107, an image memory 108, a display 109, a memory write data signal 130, and a video signal 131.
Explanation will be made as to the operation of the drawer system having such an arrangement as mentioned above by referring to FIGS. 16-18.
Referring to FIG. 16, there are shown diagrams for explaining the triangle separating process of the prior art drawer system, in which reference numeral 201 denotes a draw polygon, 901 a 1st polygon separated triangle, 902 a 2nd polygon separated triangle, 903 a 3rd polygon separated triangle.
FIG. 17 is a diagram for explaining the triangle interpolating process of the prior art drawer system based on span, in which 1001 denotes a 1st divided triangle vertex, 1002 a 2nd divided triangle vertex, 1003 a 3rd divided triangle vertex, 1004 a 1st divided triangle side, 1005 a 2nd divided triangle side, 1006 a 3rd divided triangle side, 1007 an interpolate horizontal span of the divided triangle.
FIG. 18 is a diagram for explaining the polygon interpolating process of the divided triangles of the prior art drawer system, in which 1101 denotes a 1st polygon separated triangle interpolated by the horizontal span, 1102 a 2nd polygon separated triangle being interpolated by the horizontal span, and 1103 a horizontal span by which the 2nd polygon separated triangle is interpolated.
First, the polygon vertex data 821 of the draw polygon 201 is given to the triangle separater 801, the triangle separater 801 divides the draw polygon 201 into the 1st polygon separated triangle 901, 2nd polygon separated triangle 902 and 3rd polygon separated triangle 903 and sequentially generates the triangle vertex data 822 indicative of each triangle vertex.
Next, the triangle vertex register 802, when receiving the triangle vertex data 822 generated by the triangle separater 801, separates the received data into data indicative of one long side and two short sides and generates the triangle side point data 823 based on the drawing directions. The prior art drawer system performs an interpolating operation over the triangle with use of the horizontal line (which will be referred to as the horizontal span 1103 for interpolation of a polygon separated triangle, hereinafter) sequentially scanned vertically from the top to down on the display 109. To this end, the 1st divided triangle vertex 1001 as a side interpolation start vertex and the 2nd divided triangle vertex 1002 as a side interpolation terminate vertex are set in the 1st triangle side interpolater 803, the 1st divided triangle vertex 1001 as a side interpolation start vertex and the 3rd divided triangle vertex 1003 as a side interpolation terminate vertex are set in the 2nd triangle side interpolater 804, and the 2nd divided triangle vertex 1002 as a side interpolation start vertex and the 3rd divided triangle vertex 1003 as a side interpolation terminate vertex are set in the 3rd triangle side interpolater 805, respectively.
Accordingly the 1st divided triangle side 1004 is set in the 1st triangle side interpolater 803, the 2nd divided triangle side 1005 is set in the 2nd triangle side interpolater 804, and the 3rd divided triangle side 1006 is set in the 3rd triangle side interpolater 805. This means that all the sides of the triangle are subjected to the interpolating operation.
The outline generator 106, when receiving the triangle data valid signal 828 indicative of the completion of separation of the triangle, outputs the next span send request 829 as a triangle side interpolation control signal to the 1st triangle side interpolater 803, 2nd triangle side interpolater 804 and 3rd triangle side interpolater 805.
The 1st triangle side interpolater 803 and 3rd triangle side interpolater 805, when receiving the next span send request 829, advances the triangle side interpolation by one unit. That is, the 1st triangle side interpolater 803 generates the interpolated line data 824 of the 1st triangle side indicative of a second triangle side interpolation coordinate point, while the 3rd triangle side interpolater 805 generates the interpolated line data 826 of the 3rd triangle side indicative of a first triangle side interpolation coordinate point.
The interpolation data selector 806 selects the interpolated line data 824 of the 1st triangle side generated by the 1st triangle side interpolater 803 and generates the 2nd span point data 827 indicative of a span terminate coordinate point.
Next, the line drawer 107, on the basis of the 2nd span point data 827 as span coordinate information on the triangle and the interpolated line data 826 of the 3rd triangle side as the 1st span point coordinate data, performs its interpolating operation and generates the memory write data signal 130 to be written in the image memory 108.
The image memory 108 receives the memory write data signal 130 writes a corresponding graphic pattern in its image memory region. The graphic pattern written in the image memory region generates the video signal 131 as an image display signal in synchronism with the display timing. And the display 109 performs its displaying operation on the basis of the video signal 131 generated by the image memory 108.
When the 1st triangle side interpolater 803 completes the triangle side interpolating operation of the 1st divided triangle side 1004, the interpolation data selector 806 selects the interpolated line data 825 of the 2nd triangle side generated by the 2nd triangle side interpolater 804 and generates the 2nd span point data 827 indicative of a span terminate coordinate point. When the 2nd triangle side interpolater 804 completes its triangle side interpolating operation of the 2nd divided triangle side 1005, this means that one triangle has been drawn. In a similar way, the remaining triangles are drawn. When all the triangles of the polygon have been drawn, this means that the drawing of the polygon has been completed.
As mentioned above, the prior art drawer system requires the triangle separating operation based on the function of the line drawer and also requires the respective drawing operations of the separated triangles. Further, the triangle drawing operation needs the triangle side judging operation and the triangle side setting operation to the triangle side interpolater. For this reason, the triangle side operation, which is unnecessary for display of a polygon in itself, must be doubly carried out, which becomes an obstacle to improving the drawing speed.